<template>
    <div id="System_Site">
        <el-breadcrumb separator="/">
            <el-breadcrumb-item :to="{ path: '/home' }">系统设置</el-breadcrumb-item>
            <el-breadcrumb-item>提现设置</el-breadcrumb-item>
        </el-breadcrumb>
        <el-card class="box-card">
            <el-row :gutter="20">
                <el-col :span="15">
                    <el-form ref="form" :model="form" label-width="300px" size="small">
                        <el-form-item label="提现金额：">
                            <el-input v-model="form.withdraw_money"></el-input>
                        </el-form-item>
                        <el-form-item label="提现比率：">
                            <el-input v-model="form.withdraw_rate"></el-input>
                        </el-form-item>
                        <el-form-item :label="this.$store.state.name+'说明：'">
                            <el-select
                                    v-model="form.coinesc"
                                    multiple
                                    filterable
                                    allow-create
                                    default-first-option
                                    :placeholder="'请填写'+this.$store.state.name+'说明'"
                                    style="width: 100%">
                            </el-select>
                        </el-form-item>
                        <el-form-item>
                            <el-button type="primary" @click="onSubmit">保存</el-button>
                        </el-form-item>
                    </el-form>
                </el-col>
            </el-row>
        </el-card>
    </div>
</template>

<script>
    export default {
        name: "system_site",
        data() {
            return {
                form: {
                    coinesc: '',
                    withdraw_money: '',
                    withdraw_rate: '',
                },
            }
        },
        created() {
            this.getData()
        },
        methods: {
            onSubmit() {
                this.$axios.post('admin/config/withdraw_set', {config: this.form}).then((res) => {
                    this.$message.success('成功');
                    this.getData();
                });
            },
            getData() {
                this.$axios.post('admin/config/withdraw', '').then((res) => {
                    this.form = res.data;
                });
            },
        }
    }
</script>

<style scoped>

</style>